import request from '@/utils/request'

// 查询分类表列表
export function listCategory(query) {
  return request({
    url: '/energize/category/list',
    method: 'get',
    params: query
  })
}

// 查询分类表详细
export function getCategory(cid) {
  return request({
    url: '/energize/category/' + cid,
    method: 'get'
  })
}

// 新增分类表
export function addCategory(data) {
  return request({
    url: '/energize/category',
    method: 'post',
    data: data
  })
}

// 修改分类表
export function updateCategory(data) {
  return request({
    url: '/energize/category',
    method: 'put',
    data: data
  })
}

// 删除分类表
export function delCategory(cid) {
  return request({
    url: '/energize/category/' + cid,
    method: 'delete'
  })
}
